//
//  ViewController.m
//  testFyUILib
//
//  Created by luoc on 16/2/6.
//  Copyright © 2016年 luoc. All rights reserved.
//

#import "BaseViewController.h"
#import "UIDlgBuild.h"
@interface CBaseViewController ()
{
    UIManager   *pManager;
    NSString    *pXml;
}
@end

@implementation CBaseViewController

- (id)initWithXml:(NSString*)xml
{
    self = [super init];
    if (self) {
        pXml = xml;
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    NSString *file = [[NSBundle mainBundle] pathForResource:pXml ofType:@"xml"];
    
    UIDlgBuild* build =[[UIDlgBuild alloc] init];
    pManager = [[UIManager alloc] initWithUIManagerDelegate:self];
    UIView* view = [build Create:[file UTF8String] :^UIView *(const char *pstrClass) {
        return NULL;
    } :pManager :self.view];
    [pManager SetMainView:view];
    [view setFrame:CGRectMake(0, 0, [[UIScreen mainScreen] bounds].size.width, [[UIScreen mainScreen] bounds].size.height)];
    [pManager setFloatViewNeedDisplay];
}

- (BOOL)OnNotify:(id<UIAttribute>)pSender event:(FYEVENT)event param:(void *)param{
    return NO;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
